#ifndef  QQ_FILE_VIEW
#define QQ_FILE_VIEW

#include <qdialog.h>
#include <qdialogbuttonbox.h>
#include <qfileiconprovider.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qmimedatabase.h>
#include <qstandarditemmodel.h>

#include <ElaContentDialog.h>
#include <ElaListView.h>

#include "chat/QQFileDelegate.h"

#include "widget/QQContentDialog.h"

class QQFileView :public QQContentDialog
{
	Q_OBJECT
public:
	QQFileView(QWidget* parent = nullptr);
	~QQFileView();
	void setTitle(const QString& title);
	void loadFile(const QFileInfo& fileInfo);
	void loadFile(const QString& tile, const QFileInfo& fileInfo);
	void loadFiles(const QFileInfoList& fileInfos);
	void loadFiles(const QString& title, const QFileInfoList& fileInfos);
private slots:
	void doSendFiles();
	void doCancelSendFiles();
private:
	QLabel* mTitle;
	QStandardItemModel* mModel;
	ElaListView* mListView;
	QQFileDelegate* mFileDelegate;
	QFileIconProvider mIconProvider;
};

#endif // ! QQ_FILE_VIEW

